Optimal. Leaf size=120 \[ -\frac {96 \sqrt {a+a \sin (c+d x)}}{d^4}+\frac {12 x^2 \sqrt {a+a \sin (c+d x)}}{d^2}+\frac {48 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d^3}-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3400, 3377,
2718} \begin {gather*} -\frac {96 \sqrt {a \sin (c+d x)+a}}{d^4}+\frac {48 x \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right ) \sqrt {a \sin (c+d x)+a}}{d^3}+\frac {12 x^2 \sqrt {a \sin (c+d x)+a}}{d^2}-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right ) \sqrt {a \sin (c+d x)+a}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3400
Rubi steps
\begin {align*} \int x^3 \sqrt {a+a \sin (c+d x)} \, dx &=\left (\csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int x^3 \sin \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx\\ &=-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}+\frac {\left (6 \csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int x^2 \cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx}{d}\\ &=\frac {12 x^2 \sqrt {a+a \sin (c+d x)}}{d^2}-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}-\frac {\left (24 \csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int x \cos \left (\frac {c}{2}-\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx}{d^2}\\ &=\frac {12 x^2 \sqrt {a+a \sin (c+d x)}}{d^2}+\frac {48 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d^3}-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}-\frac {\left (48 \csc \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}\right ) \int \cos \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \, dx}{d^3}\\ &=-\frac {96 \sqrt {a+a \sin (c+d x)}}{d^4}+\frac {12 x^2 \sqrt {a+a \sin (c+d x)}}{d^2}+\frac {48 x \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d^3}-\frac {2 x^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right ) \sqrt {a+a \sin (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 108, normalized size = 0.90 \begin {gather*} -\frac {2 \left (\left (48-24 d x-6 d^2 x^2+d^3 x^3\right ) \cos \left (\frac {1}{2} (c+d x)\right )+\left (48+24 d x-6 d^2 x^2-d^3 x^3\right ) \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {a (1+\sin (c+d x))}}{d^4 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.08, size = 145, normalized size = 1.21
method | result | size |
risch | \(-\frac {i \sqrt {2}\, \sqrt {-a \left (-2-2 \sin \left (d x +c \right )\right )}\, \left (-i x^{3} d^{3}+d^{3} x^{3} {\mathrm e}^{i \left (d x +c \right )}+6 i d^{2} x^{2} {\mathrm e}^{i \left (d x +c \right )}-6 d^{2} x^{2}+24 i d x -24 d x \,{\mathrm e}^{i \left (d x +c \right )}-48 i {\mathrm e}^{i \left (d x +c \right )}+48\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-1\right ) d^{4}}\) | \(145\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{3} \sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.74, size = 117, normalized size = 0.98 \begin {gather*} 2 \, \sqrt {2} \sqrt {a} {\left (\frac {6 \, {\left (d^{2} x^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 8 \, \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \cos \left (\frac {1}{4} \, \pi - \frac {1}{2} \, d x - \frac {1}{2} \, c\right )}{d^{4}} - \frac {{\left (d^{3} x^{3} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 24 \, d x \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )\right )} \sin \left (\frac {1}{4} \, \pi - \frac {1}{2} \, d x - \frac {1}{2} \, c\right )}{d^{4}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.96, size = 82, normalized size = 0.68 \begin {gather*} -\frac {2\,\sqrt {a\,\left (\sin \left (c+d\,x\right )+1\right )}\,\left (48\,\sin \left (c+d\,x\right )-6\,d^2\,x^2+d^3\,x^3\,\cos \left (c+d\,x\right )-6\,d^2\,x^2\,\sin \left (c+d\,x\right )-24\,d\,x\,\cos \left (c+d\,x\right )+48\right )}{d^4\,\left (\sin \left (c+d\,x\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________